<?php


class Lottery extends Base_Controller
{
	
	public $_json;
	
	
	public function __construct()
	{
		parent::__construct();
	}
	
	public function index()
	{

		$this->outputjson();
		$info = array();
		if(!empty($this->_json))
		{
			$info = json_decode($this->_json,TRUE);
			print_r($info);
		}
	}
	
	private function outputjson()
	{
		$name = $this->input->post('name');
		$json = $this->input->post('json');
		$tmp['name'] = $name;
		$tmp['json'] = $json;
		$this->_json = json_encode($tmp);
	}
	
	private function get_api($name)
	{
		$api = array();
	}
}